/****** Object:  Stored Procedure [dbo].spPhieuGiaoHangUpdate Script Date: 6/12/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spPhieuGiaoHangUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spPhieuGiaoHangUpdate]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		21/06/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spPhieuGiaoHangUpdate]
(
	@SoPG nvarchar(14),
	@NgayGiao date,
	@PhuongThucGiao nvarchar(35),
	@PhuongThucTT nvarchar(35),
	@NguoiGiao nvarchar(35),
	@NguoiNhan nvarchar(35),
	@SoHD nvarchar(12),
	@GhiChu nvarchar(200),
	@MaKH nvarchar(6),
	@SoPX nvarchar(14)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_PhieuGiaoHang]
SET [NgayGiao] = @NgayGiao,
	[PhuongThucGiao] = @PhuongThucGiao,
	[PhuongThucTT] = @PhuongThucTT,
	[NguoiGiao] = @NguoiGiao,
	[NguoiNhan] = @NguoiNhan,
	[SoHD] = @SoHD,
	[GhiChu] = @GhiChu,
	[MaKH] = @MaKH,
	[SoPX] = @SoPX
WHERE	[SoPG] = @SoPG
GO

--GRANT EXECUTE ON [dbo].[spPhieuGiaoHangUpdate] TO [sa]
--GO
